<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    //使用构造函数创建数组
    const arr2 = new Array(1, 2, 3, 4, 5)
    console.log(arr2);
    //推荐使用数组字面量创建数组,而不是用new Array构造函数
    const arr1 = [1, 2, 3, 4, 5]
    console.log(arr1);
  </script>
</body>

</html>